<template>
  <div>
    <my-header></my-header>
    <div class="out_shop">
      <div class="head">
        <router-link to="/">首页 > </router-link>
        <router-link to="/wrindex">结婚商城 > </router-link>
        <span>{{ outshop[0].title }}</span>
      </div>
      <div class="content_top">
        <div>
          <img :src="outshop[0].oimg" alt="" />
        </div>
        <div class="content_top_title">
          <div class="d1">
            <span></span>
            <router-link to="">{{ outshop[0].title }}</router-link>
          </div>
          <div class="d2">
            <span>*****</span>
            <span>
              <el-button type="text" @click="open">
                点击查看完整电话
              </el-button>
            </span>
          </div>
          <div class="d3">
            <span>{{ outshop[0].place }}</span>
            <span class="el-icon-location-outline">
              <el-button type="text"> 地图 </el-button>
            </span>
          </div>
          <div class="d4">
            <span>金犀奖</span>
            <span>2020好店指南,人气口碑商户</span>
          </div>
        </div>
        <div class="out_shop_comments">
          <div>
            <div class="com">
              <p style="color: #fe7e33">5.0</p>
              <p>评分</p>
            </div>
            <div class="com">
              <p>377</p>
              <p>评价</p>
            </div>
            <div class="com">
              <p>3625</p>
              <p>关注</p>
            </div>
          </div>
          <div class="com_btn">
            <button type="text" @click="openMsg">私信商家</button>
            <button type="text" @click="opensuc">免费预约</button>
          </div>
        </div>
        <div class="com_nav">
          <div>商家首页</div>
          <div>套餐</div>
          <div>动态</div>
          <div>商家介绍</div>
        </div>
      </div>
      <div class="content_show">
        <div>
          <img :src="outshop[0].showimg" alt="" />
          <div class="mv_item">
            <div>
              <img
                src="https://qnm.hunliji.com/o_1d7ceeev71lus12nvg71h55ve8a.png"
                alt=""
              />
              <span><i class="iconfont icon-star"></i>不满意重拍</span>
              <span><i class="iconfont icon-star"></i>七天选片</span>
              <span><i class="iconfont icon-star"></i>底片全送</span>
              <span><i class="iconfont icon-star"></i>15天出精修</span>
            </div>
            <div>承诺下单7天内可退,拍摄前30天前全款可退</div>
          </div>
        </div>
        <div class="content_show_item">
          <div class="content_show_item_d">
            <span>优惠券</span>
            <div class="position_1">
              <img
                src="https://qnm.hunliji.com/o_1d6pe1360aav1pr51854onp1l6ja.png"
                alt=""
              />
              <span>¥2000</span>
              <span :plain="true" @click="open2">领取</span>
            </div>
          </div>
          <div class="content_show_item_d">
            <span>咨询礼</span>
            <span>{{ outshop[0].zixun }}</span>
          </div>
          <div class="content_show_item_d">
            <span>到店礼</span>
            <span>{{ outshop[0].daodian }}</span>
          </div>
          <div class="content_show_item_d" style="border: none">
            <span>公告</span>
            <div class="position_2">
              {{ outshop[0].gonggao }}
            </div>
          </div>
        </div>
      </div>
      <div class="out_shop_item">
        <p>商家精选</p>
        <div class="foot_left">
          <div class="out_shop_item_d">
            <div class="out_shop_item_left">
              <img
                src="https://qnm.hunliji.com/2765156940C01B82C523CE0876C22075.jpg?imageView2/2/w/664/h/416"
                alt=""
              />
            </div>
            <div class="out_shop_item_right">
              <p>【高定系列】现代艺术+总监级原创</p>
              <p>· 可先预付5100.00元定金 随时可退</p>
              <div class="right_price">
                <span>¥</span>
                <span>16998</span>
                <span>¥36998.00</span>
              </div>
            </div>
          </div>
          <div class="out_shop_item_d">
            <div class="out_shop_item_left">
              <img
                src="https://qnm.hunliji.com/2765156940C01B82C523CE0876C22075.jpg?imageView2/2/w/664/h/416"
                alt=""
              />
            </div>
            <div class="out_shop_item_right">
              <p>【高定系列】现代艺术+总监级原创</p>
              <p>· 可先预付5100.00元定金 随时可退</p>
              <div class="right_price">
                <span>¥</span>
                <span>16998</span>
                <span>¥36998.00</span>
              </div>
            </div>
          </div>
        </div>
        <foot-right></foot-right>
      </div>
      <div style="clear: both"></div>
    </div>
    <my-footer></my-footer>
  </div>
</template>
<script>
import FootRight from "./FootRight.vue";
export default {
  components: { FootRight },
  data() {
    return {
      outshop: [
        { title: "" },
        { price: "" },
        { place: "" },
        { zixun: "" },
        { daodian: "" },
        { gonggao: "" },
        { phone: "" },
        { oimg: "" },
        {showimg:""}
      ],
    };
  },
  methods: {
    open() {
      this.$alert(this.outshop[0].phone, "欢迎致电", {
        confirmButtonText: "确定",
      });
    },
    open2() {
      if(JSON.parse(sessionStorage.getItem("is_login"))){
        this.$message.success("恭喜您领取成功");
      }else{
         this.$router.push({
          path:'/login'
        })
      }
    },
    openMsg() {
      if(JSON.parse(sessionStorage.getItem("is_login"))){
        this.$alert("您已登录,稍后会有工作人员与您私信", "私信商家", {
        confirmButtonText: "确定",
      });
      }else{
        this.$router.push({
          path:'/login'
        })
      } 
    },
    opensuc() {
      if(JSON.parse(sessionStorage.getItem("is_login"))){
        this.$message.success("恭喜您预约成功");
      }else{
        this.$router.push({
          path:'/login'
        })
      } 
    },
  },
  mounted() {
    let sid = this.$route.query.sid;
    this.axios.get("/out_shop?sid=" + sid).then((res) => {
      this.outshop = res.data;
    });
  },
};
</script>
<style scoped>
img:hover{
  opacity: 0.8;
}

.out_shop {
  width: 1200px;
  margin: 0 auto;
  position: relative;
}
.head {
  color: #666;
  font-size: 12px;
  margin: 15px 0;
}
.head > a {
  color: #999;
}
.content_top > div > img {
  width: 190px;
  height: 190px;
}
.content_top_title {
  width: 690px;
  height: 146px;
  position: absolute;
  top: 30px;
  left: 220px;
}
.d1 > a {
  font-size: 24px;
  font-weight: bold;
  color: #000;
  margin-right: 30px;
}
.d2 {
  color: #666;
  font-size: 14px;
}
.d2 > span:last-child {
  color: #13acec;
  margin-left: 20px;
}
.d3 {
  font-size: 16px;
  color: #666;
}
.d3 > span:last-child {
  color: #13acec;
  margin-left: 20px;
}
.d4 > span:first-child {
  border: 1px solid #f83244;
  border-radius: 2px;
  color: #f83244;
  font-size: 12px;
  padding: 1px 5px;
}
.d4 > span:last-child {
  font-size: 14px;
  margin-left: 10px;
  color: #666;
}
.out_shop_comments {
  position: absolute;
  right: 0px;
  top: 30px;
}
.com {
  float: left;
  font-size: 24px;
  font-weight: bold;
  margin-right: 50px;
  margin-bottom: 50px;
}

.com > p:last-child {
  font-size: 14px;
  font-weight: 400;
  text-align: right;
  color: #666;
}
.com_btn {
  text-align: center;
}
.com_btn > button {
  border: 1px solid #f83244;
  border-radius: 20px;
  padding: 0 22px;
  background: #fff;
  color: #f83244;
  margin-right: 10px;
  height: 40px;
  font-size: 14px;
}
.com_btn > button:hover {
  cursor: pointer;
}
.com_btn > button:focus {
  outline: none;
}
.com_nav {
  position: absolute;
  left: 190px;
  top: 177px;
  background: #f83244;
  color: #fff;
  font-size: 18px;
  width: 1010px;
  height: 44px;
}
.com_nav div {
  float: left;
  line-height: 44px;
  width: 190px;
  text-align: center;
}
.com_nav div:hover {
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
}
.content_show {
  position: relative;
}
.content_show > div:first-child {
  width: 598px;
}
.content_show > div:first-child > img {
  width: 100%;
  border-radius: 5px;
}
.mv_item > div > img {
  width: 79px;
  height: 24px;
}
.mv_item {
  box-shadow: 0px 8px 28px rgba(0, 0, 0, 0.06);
  padding: 20px 24px 21px 24px;
  font-size: 14px;
  color: #666;
}
.mv_item > div > span {
  width: 100px;
  height: 22px;
  display: inline-block;
  padding-bottom: 10px;
  margin-left: 10px;
}
.mv_item i {
  color: rgb(254, 126, 51);
}
.content_show_item {
  width: 582px;
  height: 432px;
  background: #fafafa;
  padding: 0 30px;
  position: absolute;
  top: 0;
  left: 610px;
}
.content_show_item_d {
  padding: 30px 0;
  border-bottom: 1px dashed #ddd;
  font-size: 14px;
  color: #333;
}
.content_show_item_d > span:first-child {
  font-size: 20px;
  font-weight: bold;
  color: #000;
  margin-right: 20px;
}
.position_1 img {
  width: 103px;
  height: 28px;
  position: absolute;
  top: 30px;
  left: 110px;
}
.position_1 span {
  top: 36px;
  position: absolute;
  left: 120px;
  color: rgb(254, 126, 51);
}
.position_1 span:hover {
  cursor: pointer;
}
.position_1 span:last-child {
  top: 36px;
  left: 175px;
  position: absolute;
}
.position_2 {
  position: absolute;
  top: 290px;
  left: 110px;
  width: 442px;
  height: 60px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  display: -webkit-box;
}
.out_shop_item {
  float: left;
  margin-top: 40px;
}
.out_shop_item_d {
  padding: 20px 0;
  border-bottom: 1px solid #ddd;
  height: 208px;
}
.out_shop_item > p:first-child {
  font-size: 24px;
}
.out_shop_item_left img {
  width: 332px;
  height: 208px;
}
.out_shop_item .out_shop_item_left,
.out_shop_item_right {
  float: left;
  margin-right: 20px;
}
.out_shop_item_right > p:first-child {
  font-weight: bold;
  font-size: 20px;
  margin-bottom: 20px;
}
.out_shop_item_right > p:nth-child(2) {
  color: #666;
  font-size: 14px;
}
.right_price {
  font-size: 14px;
  margin-top: 100px;
  color: #f83244;
}
.right_price > span:nth-child(2) {
  font-size: 24px;
  font-weight: bold;
  margin: 0 10px 0 5px;
}
.right_price > span:last-child {
  color: #999;
  text-decoration: line-through;
}
.foot_left {
  float: left;
}
</style>